//
//  AddressSelectView.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/22.
//  Copyright © 2020 王洋. All rights reserved.
//
#import "UIView+shadowPath.h"

#import "AddressSelectView.h"

@implementation AddressSelectView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    [self.addressControl viewShadowPathWithColor:[UIColor blackColor] shadowOpacity:0.5 shadowRadius:6 shadowPathType:LeShadowPathCommon shadowPathWidth:4];
    
}

- (void)fillCellWithModel:(AddressItemModel *)model {
    
    if (model.userName.length > 0) {
        self.selectAddressLab.hidden = YES;
        self.nameLab.text = model.userName;
        self.phoneLab.text = model.phone;
        self.addressLab.text = [NSString stringWithFormat:@"%@%@%@%@",model.province,model.city,model.area,model.address];

    } else {
        self.selectAddressLab.hidden = NO;
    }
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        [self.addressControl pp_clipCorners:UIRectCornerAllCorners radius:6];
    });
}

@end
